#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	int n = 0;
	scanf("%d", &n);
	for (int i = n; i > 0; i--) {
		for (int j = i; j > 0; j--) {
			if (j == 1) {
				printf("%d", j);
			}
			else printf("%d ", j);
		}
		printf("\n");
	}
	return 0;
}